
#ifndef _ADDRESS_H_
#define _ADDRESS_H_

#include "PostalCode.h"

/**
 * Implementation of the class Address.
 * An address is defined by a locality, a street, the house door number
 * and the postal code.
 */
class Address
{

public:
    Address();
    Address(string locality, string street, unsigned short doorNumber, PostalCode &postalCode);
    virtual ~Address();

    // Locality
    string getLocality() const;
    void setLocality(string locality);

    //Street
    string getStreet() const;
    void setStreet(string street);

    // Door Number
    unsigned short getDoorNumber() const;
    void setDoorNumber(unsigned short doorNumber);

    // Postal Code
    PostalCode *getPostalCode() const;
    void setPostalCode(PostalCode &postalCode);

    // I/O
    string printAddres();
    void newAddress(Address &address);

private:
    string locality;
    string street;
    unsigned short doorNumber;
    PostalCode *postalCode;

};
#endif // _ADDRESS_H_
